package com.tensquare.recruit.dao;

import com.tensquare.recruit.pojo.Recruit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author Macross
 * @Type RecruitDao.java
 * @Desc
 * @date 2019/12/17 15:53
 */
public interface RecruitDao extends JpaRepository<Recruit,String>,JpaSpecificationExecutor<Recruit> {

    /**
     * 获取推荐职位信息列表
     * @param state 职位状态
     * @return
     */
    List<Recruit> findTop4ByStateOrderByCreateTimeDesc(String state);

    /**
     * 获取最新职位信息列表
     * @param state
     * @return
     */
    List<Recruit> findTop12ByStateNotOrderByCreateTimeDesc(String state);
}
